package TruongNhaLib;

import org.json.JSONException;
import org.json.JSONObject;

public class Term {
	private int term_id;
	private int number;//ky1,2
	private int year;
	public Term(){
		term_id = -1;
		number = -1;
		year = -1;		
	}
	public Term(int _term_id, int _number, int _year){
		term_id = _term_id;
		number = _number;
		year = _year;
	}
	public Term(JSONObject obj){
		try {
			term_id = obj.getInt("termId");
			number = obj.getInt("number");
			year = obj.getInt("year");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public int getTerm_id(){
		return term_id;
	}
	public int getNumber(){
		return number;
	}
	public int getYear(){
		return year;
	}
}
